<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>栅格互换</title>
     <!-- 引入Bootstrap的css样式 -->
     <link rel="stylesheet" href="css/bootstrap.min.css" />
     <style>
        .col-sm-6,.col-sm-12 .col-md-4,.col-md-8{
             outline: 1px solid black;
             background: pink;
             height: 300px;
         }
     </style>
    <!-- 引入jQuery -->
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-sm-12 col-md-8">.col-sm-12 .col-md-8</div>
            <div class="col-sm-6 col-md-4">.col-sm-6 col-md-4</div>
        </div>
        <div class="row">
            <div class="col-sm-6 col-md-4">.col-sm-6 .col-md-4</div>
            <div class="col-sm-6 col-md-4">.col-sm-6 .col-md-4</div>
            <div class="col-sm-6 col-md-4">.col-sm-6 .col-md-4</div>
        </div>
        <div class="row">
            <div class="col-sm-6 col-md-9">col-sm-6</div>
            <div class="col-sm-6 col-md-3">col-sm-6</div>
        </div>
    </div>
</body>
</html>